package com.example.helloandroid;
import android.app.Activity;
import android.os.Bundle;
import android.content.Intent;
import android.widget.TextView;
//import android.widget.Toast;
import android.view.View;
//import android.util.Log;

public class ChildActivity extends Activity {
	
	
	TextView tvNadavka; 
	String TAG = new String("KOKOT");
	int resID;
	
	 public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.child1);
        Intent thisIntent = getIntent();

        tvNadavka = (TextView)findViewById(R.id.tvNadavka);
        String OMG = thisIntent.getExtras().getString("OMG"); 
        
        if (OMG.compareTo("true") == 0){
        	resID = R.string.tOMGString;
        }
        else {
        	resID = R.string.tNadavkaPrefix;
        }

	    tvNadavka.setText(getString(resID)+thisIntent.getExtras().getString("NADAVKA")+"!");
	    
	    	    
	    

	 }
	 
	 
	 public void btnCloseClick(View v){
		 finish();
	 }
	 /*
    private void showToast(CharSequence sToastText){
	    Toast toast = Toast.makeText(getApplicationContext(), sToastText, Toast.LENGTH_SHORT);
	    toast.show();
    }
    */
	 
}
